<?php

namespace app\api\controller;

use app\common\controller\Api;
use app\api\service\WorkOrderService;

class WorkOrder extends Api
{
    protected $noNeedLogin = [];
    protected $noNeedRight = '*';

    /**
     * 列表
     *
     */
    public function list()
    {
        $data = $this->request->post();
        $res = WorkOrderService::getList($data);
        return json($res);
    }

    /**
     * 详情
     *
     */
    public function details()
    {
        $data = $this->request->post();
        $res = WorkOrderService::getDetails($data);
        return json($res);
    }

    /**
     * 接单出发
     *
     */
    public function receiving_orders()
    {
        $data = $this->request->post();
        $res = WorkOrderService::receivingOrders($data);
        return json($res);
    }

    /**
     * 确认到达
     *
     */
    public function reach_orders()
    {
        $data = $this->request->post();
        $res = WorkOrderService::reachOrders($data);
        return json($res);
    }

    public function order_exception_type()
    {
        $data = $this->request->post();
        $res = WorkOrderService::getOrderExceptionType($data);
        return json($res);
    }

    public function report_exception()
    {
        $data = $this->request->post();
        $res = WorkOrderService::reportException($data);
        return json($res);
    }

    public function order_add_type()
    {
        $data = $this->request->post();
        $res = WorkOrderService::getOrderAddType($data);
        return json($res);
    }

    public function order_additem()
    {
        $data = $this->request->post();
        $res = WorkOrderService::orderAdditem($data);
        return json($res);
    }

    public function finish_order_photo_type()
    {
        $data = $this->request->post();
        $res = WorkOrderService::finishOrderPhotoType($data);
        return json($res);
    }

    public function finish_order()
    {
        $data = $this->request->post();
        $res = WorkOrderService::finishOrder($data);
        return json($res);
    }

    // 我的工单
    public function my_work_order()
    {
        $data = $this->request->post();
        $res = WorkOrderService::myWorkOrder($data);
        return json($res);
    }





}